package com.john.study.es.module;

import com.alibaba.fastjson.annotation.JSONField;
import com.john.study.es.config.BooleanEnum;
import com.john.study.es.config.FieldDataTypeEnum;
import com.john.study.es.config.annotation.FieldMapping;
import com.john.study.es.config.annotation.FieldMappingAll;
import com.john.study.es.config.annotation.MappingBean;

/**
 * @author jiangguangtao 2017/7/27.
 */
@MappingBean(value = "page")
@FieldMappingAll(analyzer = "ik_smart")
public class BaseWebPageVo {
    @FieldMapping
    private String url;

    @FieldMapping
    private String title;

    @FieldMapping
    private String keywords;

    @FieldMapping
    private String description;

    @FieldMapping
    private String content;

    @JSONField(name = "page_key")
    @FieldMapping(name = "page_key", type = FieldDataTypeEnum.KEYWORD, index = BooleanEnum.TRUE)
    private String pageKey; // 页面文档的MD5值，用于标识是否有过更改

    @JSONField(name = "url_key")
    @FieldMapping(name = "url_key", type = FieldDataTypeEnum.KEYWORD, index = BooleanEnum.TRUE)
    private String urlKey; // 页面url MD5 key 用于记录的ID

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getKeywords() {
        return keywords;
    }

    public void setKeywords(String keywords) {
        this.keywords = keywords;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getPageKey() {
        return pageKey;
    }

    public void setPageKey(String pageKey) {
        this.pageKey = pageKey;
    }

    public String getUrlKey() {
        return urlKey;
    }

    public void setUrlKey(String urlKey) {
        this.urlKey = urlKey;
    }
}
